classdef DartObj
    %DARTOBJ Summary of this class goes here
    %   Detailed explanation goes here
    
    properties(SetAccess = public, GetAccess = public, Access = public)
        m_position1;
        m_boundingbox1;
        m_position2;
        m_boundingbox2;
        
        m_majorAxisLength1;
        m_minorAxisLength1;
        m_orientation1;
        m_convexImage1;
        
        m_majorAxisLength2;
        m_minorAxisLength2;
        m_orientation2;
        m_convexImage2;
        
        m_bg1_diff;
        m_fg1_diff;
        m_bg1_mask;
        m_actbg1_mask;
        
        m_bg2_diff;
        m_fg2_diff;
        m_bg2_mask;
        m_actbg2_mask;
        
        m_time;
        
        m_position1_history = [];
        m_position2_history = [];
        
        m_state1 = [];   %Detection of Dart, Intersection of Dart, Inside/Outside of other DART
        m_state2 = [];
        
        m_score = '';
        m_score_printed = 0;
    end
    properties(Constant,SetAccess = public)
        position_weight = 1;
        color_weight = 0;
        size_weight = 0;
        w_h_ratio_weight = 0;
        
        voteThreshold = 0.01;
        
        position_max_dist = 40;
        color_max_dist = 100;
        size_max_dist = 100;
        w_h_ratio_max_dist = 100;
    end
        
    methods
        function obj = DartObj(position1, boundingbox1, position2, boundingbox2, majorAxisLength1, minorAxisLength1, orientation1, convexImage1, majorAxisLength2, minorAxisLength2, orientation2, convexImage2, time, bg1_diff, fg1_diff, bg1_mask, actbg1_mask, bg2_diff, fg2_diff, bg2_mask, actbg2_mask)
            obj.m_position1 = [position1];
            obj.m_boundingbox1 = [boundingbox1];
            obj.m_position2 = [position2];
            obj.m_boundingbox2 = [boundingbox2];
            
            obj.m_majorAxisLength1 = [majorAxisLength1];
            obj.m_minorAxisLength1 = [minorAxisLength1];
            obj.m_orientation1 = [orientation1];
            obj.m_convexImage1 = [convexImage1];
            
            obj.m_majorAxisLength2 = [majorAxisLength2];
            obj.m_minorAxisLength2 = [minorAxisLength2];
            obj.m_orientation2 = [orientation2];
            obj.m_convexImage2 = [convexImage2];
            
            obj.m_bg1_diff = [bg1_diff];
            obj.m_fg1_diff = [fg1_diff];
            obj.m_bg1_mask = [bg1_mask];
            obj.m_actbg1_mask = [actbg1_mask];
            
            obj.m_bg2_diff = [bg2_diff];
            obj.m_fg2_diff = [fg2_diff];
            obj.m_bg2_mask = [bg2_mask];
            obj.m_actbg2_mask = [actbg2_mask];
            
            obj.m_time = time;
        end        
    end
end

